/*
@STI LICENSE
(C) 2006-2008 Universit�t Innsbruck.

This file is part of myOntology.

myOntologyis free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

myOntologyis distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with myOntology.  If not, see <http://www.gnu.org/licenses/>.

@STI LICENSE */
package org.myontology.users;

import org.myontology.controller.AbstractAction;
import org.myontology.controller.AttributeHolder;
import org.myontology.controller.SesameSession;
import org.myontology.view.items.FormBuilderStates;

public class EditUser extends AbstractAction {

	private SesameSession session;
	
	public void execute(AttributeHolder attributes) throws Exception {
		
		
		
		User user = new User();
		user.setValue(Login.CURRENT_USER.getValue(attributes));
		session.loadUser(user);
		
		
		UserProtocol.USER.setValue(attributes, user);
		UserProtocol.TITLE.setValue(attributes, "Edit User");
		UserProtocol.EXISTING.setValue(attributes, true);
		UserProtocol.STATE.setValue(attributes, FormBuilderStates.EDIT);
	}

	
	
}
